In late years, a silicon carbide semiconductor device (SiC semiconductor device) to be an example of a wide gap semiconductor device attracts attention, because there are various advantages. However, in the silicon carbide semiconductor device, in the case in which a distance from an electrode or a wiring line formed in an active region to an end part of the silicon carbide semiconductor device becomes short, if a negative voltage such as a surge voltage is applied to an electrode of a surface side of the silicon carbide semiconductor device, there is a problem in that discharge occurs between the electrode and the end part of the silicon carbide semiconductor device (refer to Japanese Patent Application Laid-Open (JP-A) No. 2009-231321).
To prevent the problem, it is thought that a surface of a first conductive-type semiconductor layer of the silicon carbide semiconductor device is completely covered with an insulating layer (including an insulating film). However, an interface level exists at an interface between the insulating layer and the first conductive-type semiconductor layer made of silicon carbide. Particularly, an interface level density at the interface between the insulating layer and the silicon carbide becomes larger than an interface level density at an interface between the insulating layer and silicon (Si). Electrons are trapped by the interface level existing at the interface between the insulating layer and the first conductive-type semiconductor layer made of the silicon carbide. However, because electrons at a deep interface level among the captured electrons have large time constants and cannot be escaped, the electrons function as a negative fixed charge substantially (refer to FIG. 6(a)). Particularly, because the silicon carbide has a band gap wider than a band gap of the silicon, the fixed charge increases as −1×1011 to −1×1013 as compared with the case of the silicon. For this reason, a band is lifted by the trapped electrons in the first conductive-type semiconductor layer positioned right below the insulating layer and the first conductive-type semiconductor layer takes a second conductive type (a second conductive-type region is called an “inversion layer”). As a result, a leak current flowing through the second conductive-type region, the inversion layer, and the end part (chip terminal) of the silicon carbide semiconductor device increases. A problem in the silicon carbide semiconductor device may also occur in a wide gap semiconductor device such as gallium nitride (GaN) and gallium oxide (Ga2O3) other than the silicon carbide.